package com.yida.gwj.basis.domain.request;

import com.yida.gwj.basis.domain.GwjInitBusiness;
import com.yida.gwj.basis.domain.GwjInitBusinessBuild;
import com.yida.gwj.basis.domain.GwjInitBusinessCommunity;
import com.yida.gwj.basis.domain.GwjInitBusinessLog;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 业务（基础数据管理模块）对象 basis_business
 *
 * @author lqq
 * @date 2022-11-15
 */
public class GwjInitBusinessSaveSubmitRequest implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 业务相关参数
	 */
	@Valid
	@NotNull(groups = {Init.class, Split.class, Add.class, Update.class, Merge.class}, message = "案例信息不能为空")
	private GwjInitBusiness business;

	/**
	 * 业务日志参数
	 */
	@Valid
	private GwjInitBusinessLog businessLog;

	/**
	 * 业务小区信息
	 */
	@Valid
	@NotNull(groups = {Init.class, Split.class, Add.class, Update.class, Merge.class}, message = "小区信息不能为空")
	private GwjInitBusinessCommunity businessCommunity;

	/**
	 * 业务楼栋信息
	 */
	@Valid
	@NotEmpty(groups = {Init.class, Add.class}, message = "楼栋信息不能为空")
	private List<GwjInitBusinessBuild> businessBuilds;

	/**
	 * 业务楼栋信息
	 */
	@Valid
	@NotEmpty(groups = {Split.class, Merge.class}, message = "小区信息不能为空")
	private List<GwjInitBusinessCommunity> businessCommunities;

	/**
	 * 分组校验
	 */
	public @interface Init {
	}

	/**
	 * 分组校验
	 */
	public @interface Add {
	}

	/**
	 * 分组校验
	 */
	public @interface Split {
	}

	/**
	 * 分组校验
	 */
	public @interface Update {
	}

	/**
	 * 分组校验
	 */
	public @interface Merge {
	}

	public List<GwjInitBusinessCommunity> getBusinessCommunities() {
		return businessCommunities;
	}

	public void setBusinessCommunities(List<GwjInitBusinessCommunity> businessCommunities) {
		this.businessCommunities = businessCommunities;
	}

	public GwjInitBusinessCommunity getBusinessCommunity() {
		return businessCommunity;
	}

	public void setBusinessCommunity(GwjInitBusinessCommunity businessCommunity) {
		this.businessCommunity = businessCommunity;
	}

	public List<GwjInitBusinessBuild> getBusinessBuilds() {
		return businessBuilds;
	}

	public void setBusinessBuilds(List<GwjInitBusinessBuild> businessBuilds) {
		this.businessBuilds = businessBuilds;
	}

	public GwjInitBusiness getBusiness() {
		return business;
	}

	public void setBusiness(GwjInitBusiness business) {
		this.business = business;
	}

	public GwjInitBusinessLog getBusinessLog() {
		return businessLog;
	}

	public void setBusinessLog(GwjInitBusinessLog businessLog) {
		this.businessLog = businessLog;
	}
}
